package com.dmjy.pub;

import com.dmjy.pub.export.data2csv.util.CmdUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author 敖癸
 * @formatter:on
 * @since 2024/1/13
 */
@Slf4j
@EnableAsync
@SpringBootApplication
public class ExportApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ExportApplication.class, args);
        Integer port = context.getEnvironment().getProperty("server.port", Integer.class, 8080);
        CmdUtil.openBrowser("http://localhost:" + port + "/swagger-ui.html");
    }


}
